﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContentPlaceHolder" runat="server">
    <script type="text/javascript" src="<%=ResolveUrl("~/Content/jquery-1.2.6.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/Content/jquery.functions.js")%>"></script>
    <script type="text/javascript">
    $(document).ready(function(){
   // Your code here
   
        $.getJSON("<%=ResolveUrl("~/Json/Posts")%>", null, function(data) {
            buildPostList(data);
        });
        
        //$("a").click(function(event) {
          //  alert("Thanks for visiting!");
         //});
    });
    
    $(function() {
         $('#monthList').change(function() {
            $.getJSON("<%=ResolveUrl("~/Json/Posts")%>" + this.value, null, function(data) {
                buildPostList(data);
            });
         });
         
         
    });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <p>
    <strong>Month Filter</strong> <%= Html.DropDownList("monthList", "All Months") %>
    </p>

    <div id="posts">
    </div>
</asp:Content>
